import React,{useEffect,useState} from 'react'
import {useSelector} from "react-redux";
import {AllTYPES} from "../../../types/store.d";
import {ProductCard} from "react-vant"
export default function Shop() {
    // const [arr,setarr]=useState()
    const shop=useSelector((state:AllTYPES)=>{
        return state.shopcar
    })
    return (
        <div>
            {
            shop.map((item,index)=>{
                return <ProductCard
                key={index}
                num="1"
                price="2.00"
                desc="描述信息"
                title={item.name}
                thumb={item.img}
              />
            })
        }
        </div>
    )
}
